package com.health.controller.manage;

import com.health.common.PageBean;
import com.health.common.QueryParam;
import com.health.common.R;
import com.health.service.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
@Api(tags = "预约模块")
@RequestMapping("/api/manage/order")
@Slf4j
public class OrderController {

    private final OrderService orderService;

    @ApiOperation(value = "分页查询预约信息")
    @GetMapping("/pageQuery")
    public R pageQuery(QueryParam param) {
        log.info("分页查询预约信息 {}", param);
        PageBean pageBean = orderService.pageQuery(param);
        return R.success(pageBean);
    }
}
